/*
 * @Author: 卓伊凡
 * @LastEditors: 卓伊凡
 * @email: 422108995@qq.com
 * @github: https://github.com/youyacao
 * @gitee: https://gitee.com/youyacao/
 * @Date: 2025-01-16 13:29:55
 * @LastEditTime: 2025-01-26 21:45:38
 * @motto: Still water runs deep
 * @Description: 优雅草科技卓伊凡-优雅草科技主程-兼技术总监-优雅草科技欢迎合作共赢，优雅草科技官网www.youyacao.com，感谢合作与支持，请仔细阅读优雅草科技的开源lisence文件，您可以百分百100%使用优雅草的开源产品，但是需要遵守相关规则，并且需要申明是使用了优雅草科技的产品
 * @FilePath: \ff-flutter\lib\main.dart
 */
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:ff_flutter/routes/app_pages.dart';
import 'package:ff_flutter/routes/app_routes.dart';

void main() {
  // 初始化日志记录器
  Logger.root.level = Level.ALL;
  Logger.root.onRecord.listen((record) {
    debugPrint('${record.level.name}: ${record.time}: ${record.message}');
  });

  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
        designSize: const Size(750, 1624), // 设置设计稿尺寸
        minTextAdapt: true,
        splitScreenMode: true,
        builder: (context, child) {
          return GetMaterialApp(
            debugShowCheckedModeBanner: false,
            title: 'freefirend',
            theme: ThemeData(
              primarySwatch: Colors.blue,
            ),
            initialRoute: AppRoutes.INDEX,
            getPages: AppPages.pages,
          );
        });
  }
}
